package com.shuma.upms.logging.mapper;

import com.shuma.upms.logging.domain.entity.OperationLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;


@Mapper
public interface OperationLogMapper {
    @Insert("insert into operation_logs (user_id, action, ip, detail) " +
            "values (#{userId}, #{action}, #{ip}, #{detail})")
    @Options(useGeneratedKeys = true, keyProperty = "logId", keyColumn = "log_id")
    int insert(OperationLog log);
}